<template>
	<div>
		<el-table :data="tabledata">
			<el-table-column label="账号" prop="phone"></el-table-column>
			<el-table-column label="昵称" prop="nickname"></el-table-column>
			<el-table-column label="绑定车牌" prop="plateNumber"></el-table-column>
			<el-table-column label="注册日期" prop="createTime"></el-table-column>
		</el-table>
		<el-pagination layout="prev, pager, next" :page-size="15" :total="totalsize" @current-change="changepage"></el-pagination>
	</div>
</template>

<script>
    import {getuserlist} from '../api.js'
	export default{
		
		data() {
			return {
				tabledata:[],
				totalsize:0
			}
		},
		
		mounted() {
			this.mygetuserlist(1,15);
		},
		
		methods: {
			
			changepage(page)
			{
				this.mygetuserlist(page,15);
				
			},
			
			mygetuserlist(page,size) {
				
				let params={
					currentPage:page,
					pageSize:size
				}
				getuserlist(params).then((res)=>{
					
					let result = res.data;
					console.log(result);
					this.tabledata=result.data;
					this.totalsize=result.totalSize;
					
				})
				
			}
		},
				
	}
	
	
</script>

<style>
</style>
